# -*- coding:utf-8 -*-
#2022/1/28 8:37
# author:xwl
from typing import List

from fastapi import APIRouter, Depends

from backend.app.app.api.api_Xiong.crud.pub_crud import get_well_and_dvpname_db, get_well_by_dvpname_db
from backend.app.app.api.api_v1.user import verify_token_user

well_historical_economic_evaluation = APIRouter(prefix="/well_historical_economic_evaluation", tags=["单井历史经济评价"])

@well_historical_economic_evaluation.post("/get_well_and_dvpname",name="获取数据筛选条件1")
async  def get_well_and_dvpname(ver = Depends(verify_token_user)):
    result=get_well_and_dvpname_db()
    return {
        "result":result,
        'verify': ver
    }

@well_historical_economic_evaluation.post("/get_well_by_dvpname",name="获取数据筛选条件2")
async  def get_well_by_dvpname(all_dvpunit_name:List[str],ver = Depends(verify_token_user)):
    result=get_well_by_dvpname_db(all_dvpunit_name)
    return {
        "result":result,
        'verify': ver
    }